import logging
import yagmail

def py():
    logging.basicConfig(filename='pylog.log',level=logging.DEBUG,filemode='w+'
                        ,format='%(levelname)s %(message)s %(asctime)s %(filename)s %(lineno)s')

def Email(file):
    email = yagmail.SMTP(user='1847537889@qq.com', password='liavbivsorckhacj', host='smtp.qq.com', port=465)
    email.send(to='1522057104@qq.com', subject="A3mall.0.3版本测试结果", contents='测试报告',attachments=file)
